package com.mes.bac.backend.common.constant;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;

/**
 * 工件加工状态枚举
 * @EnumValue 用于MyBatis-Plus持久化到数据库
 * @JsonValue 用于Jackson序列化为JSON时返回描述性文本
 */
@Getter
public enum ProcessStatus {
    WAITING(1, "等待加工"),
    PROCESSING(2, "正在加工"),
    COMPLETED(3, "结束加工"),
    PAUSED(4, "暂停中");

    @EnumValue
    private final int code;

    private final String description;

    ProcessStatus(int code, String description) {
        this.code = code;
        this.description = description;
    }
}